<layout name='layout/main' />
<script type="text/javascript">
$(function(){
	$("body").addClass("body-gray");
})  
</script>

<header class="am-header am-header-default">
	<div class="am-header-left am-header-nav">
	<a href="<{:U('Store/index')}>"><i class="am-header-icon am-icon-home"></i></a>
	</div>
	<h1 class="am-header-title">订单详情</h1>
</header>

<p></p>

<div class="orderList">
	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">订单编号：<{$list.order_no}><eq name="list.payStatus" value="0"><font class="am-fr" color="red">未支付</font></eq></div>
		<div class="am-panel-bd">
			<volist name="list.shop" id="f">
				<li class="orderInfo">
					<p class="pic"><a href="<{:U('Store/view',array('id'=>$f['pid']))}>"><img src="<{$f.picname}>"></a></p>
					<p class="info"><a href="<{:U('Store/view',array('id'=>$f['pid']))}>"><{$f.pname}></a><br/>
						单价：<{$f.price}><br/>
						数量：<{$f.number}>
						<eq name="list.payStatus" value="1">
						<eq name="f.comment" value="0">
						<a href="<{:U('Order/comment',array('id'=>$f['id']))}>" class="am-btn am-btn-warning am-btn-xs am-fr">点评</a>
						</eq>
						</eq>
					</p>
				</li>
			</volist>

			<div class="orderDetail">
				<p>总金额<font color="red"><{$list.money}></font>元(含运费)</p>
				<p>下单日期：<{$list.createTime|date='Y-m-d H:i:s',###}></p>
				<p>状态：<eq name="list.payStatus" value="0"><font color="red">未支付</font><else/>已支付</eq></p>
				<p>收件人：<{$list.name}>，<{$list.mobile}></p>
				<p>地址：<{$list.address}></p>
				<!--p>配送方式：<{$list.payment}>，运费：<{$list.paymentMoney}></p-->
				<notempty name="list.backInfo">
				<p>物流公司：中通，运单号：<{$list.backInfo}></p>
				<p><a href="<{:U('Order/result',array('postid'=>$list['backInfo']))}>" class="am-btn am-btn-xs am-btn-warning">物流查询</a></p>
				</notempty>
			</div>			
		</div>
		<div class="am-panel-footer am-text-right">
			<eq name="list.payStatus" value="0">
				<select class="repay" name="payType" id="payType<{$list['order_no']}>">
					<option value="1" <eq name="list.payType" value="1">selected</eq>>支付宝(手机版)</option>
					<option value="2" <eq name="list.payType" value="2">selected</eq>>微信支付</option>
				</select>
				<button class="am-btn am-btn-danger am-btn-xs" onclick="payto('<{$list['order_no']}>')">重新支付</button>

				<a href="<{:U('Order/cancel',array('id'=>$list['id']))}>" class="am-btn am-btn-success am-btn-xs" onClick="if(!confirm('确定要取消吗？'))return false;">取消订单</a>
			<else/>
				<a href="<{:U('Order/cancel',array('id'=>$list['id']))}>" class="am-btn am-btn-default am-btn-xs">删除订单</a>	
			</eq>		
		</div>
	</div>
</div>


<script>
function payto(order_no){
	location.href ="index.php?m=Store&a=repay&order_no="+order_no+"&payType="+$("#payType"+order_no).val();
}
</script>
<div class="footerBox"> <include file="Public:menu_member" /> </div>
